#pragma once

#include "scenegraph.h"

//vector used to store the keyframe
#include <vector>
using std::vector;

/*keyframe class */
class Keyframe
{
public:
	float		_position;
	float		_time;

public:
	Keyframe(float position, float time);
};

/*a controller calculating a position from keyframes*/
class KeyframeController : public Controller<float>
{
public:
	//array of keyframes
	vector<Keyframe*>	m_keyframeList;

	//a parameter plugged to a time controller
	Parameter<float>	m_time;

	//set the easy in out
	bool				m_easyinout;

public:
	//Controller
	KeyframeController();

	//Destructor
	~KeyframeController();

	//add a keyframe to the controller
	void addKeyframe(Keyframe* s);
private:

	//update the controller
	void doUpdate();
};